package com.dx.service.user.impl;

import com.dx.entity.user.Role;
import com.dx.mapper.user.RoleMapper;
import com.dx.service.user.RoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author YU.TAN
 * @since 2023-07-22
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {

    @Override
    public List<Role> listRoleByUserId(Long userId) {
        if (Objects.isNull(userId)) {
            return null;
        }
        return getBaseMapper().listRoleByUserId(userId);    }
}
